#ifndef CLIENTWINDOW_H
#define CLIENTWINDOW_H

#include <QMainWindow>
#include <QListView>
#include <QStringBuilder>
#include <QMessageBox>
#include <QColor>
#include "connectiondialog.h"
#include "connection.h"
#include "client.h"
#include "paneledmainwindow.h"

namespace Ui {
class ClientWindow;
}

class ClientWindow : public PaneledMainWindow
{
    Q_OBJECT
    
public:
    explicit ClientWindow(QWidget *parent = 0);
    ~ClientWindow();
    
private slots:
    void on_actionQuitter_triggered();
    void on_actionSe_connecter_triggered();
    void on_toolButton_clicked();
    void on_connectionDialog_accepted();
    void on_connection_receiveLine(const QString line);
    void on_connection_receiveData(const QByteArray data);
    void on_connection_sendLine(const QString line);
    void on_connection_sendData(const QByteArray data);
    void on_connection_receivingData(const qreal progress);

    void on_toolButton_2_clicked();

private:
    Ui::ClientWindow *ui;
    ConnectionDialog* connectionDialog;
    Connection* connection;
    Client* client;

    void appendLine(const QString line, const QColor color = QColor(Qt::black));
};

#endif // CLIENTWINDOW_H
